//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __CKMARSHALTST_H__
#define __CKMARSHALTST_H__

//#include "_CKMarshalTst.h"
#include "kmarshaltst_server.h"

class CKMarshalTst : public IKMarshalTst
{
public:
    CARAPI_(PInterface) Probe(
             /* [in]  */ REIID riid);

    CARAPI_(UInt32) AddRef(void);

    CARAPI_(UInt32) Release(void);

    CARAPI Aggregate(
             /* [in]  */ AggregateType type,
             /* [in] */ PInterface pObj);

    CARAPI GetDomain(
             /* [out] */ PInterface *ppObj);

    CARAPI KMarshalTst1(
        /* [in] */ Byte CharIn,
        /* [in] */ Byte ByteIn,
        /* [in] */ Boolean BoolIn,
        /* [out] */ Byte * pCharOut,
        /* [out] */ Byte * pByteOut,
        /* [out] */ Boolean * pBoolOut);

    CARAPI KMarshalTst2(
        /* [in] */ Int16 ShortIn,
        /* [in] */ Int16 UShortIn,
        /* [out] */ Int16 * pShortOut,
        /* [out] */ Int16 * pUShortOut);

    CARAPI KMarshalTst3(
        /* [in] */ Int32 Int32In,
        /* [in] */ Int32 UInt32In,
        /* [out] */ Int32 * pInt32Out,
        /* [out] */ Int32 * pUInt32Out);

    CARAPI KMarshalTst4(
        /* [in] */ Int64 Int64In,
        /* [in] */ Int64 UInt64In,
        /* [out] */ Int64 * pInt64Out,
        /* [out] */ Int64 * pUInt64Out);

    CARAPI KMarshalTst5(
        /* [in] */ Float FloatIn,
        /* [in] */ Double DoubleIn,
        /* [out] */ Float * pFloatOut,
        /* [out] */ Double * pDoubleOut);

    CARAPI KMarshalTst6(
        /* [in] */ AChar acIn,
        /* [in] */ WChar wcIn,
        /* [out] */ AChar * pAcOut,
        /* [out] */ WChar * pWcOut);

    CARAPI KMarshalTst7(
        /* [in] */ const struct TEST_STRUCT1 & StructIn1,
        /* [in] */ const struct TEST_STRUCT1 & StructIn2,
        /* [out] */ PTEST_STRUCT1 pStructOut1,
        /* [out] */ PTEST_STRUCT1 pStructOut2);

    CARAPI KMarshalTst8(
        /* [in] */ const struct TEST_STRUCT2 & StructIn1,
        /* [in] */ const struct TEST_STRUCT2 & StructIn2,
        /* [out] */ PTEST_STRUCT2 pStructOut1,
        /* [out] */ PTEST_STRUCT2 pStructOut2);

    CARAPI KMarshalTst9(
        /* [in] */ TestEnum EnumIn,
        /* [out] */ TestEnum * pPEnumOut);

    CARAPI KMarshalTst10(
        /* [in] */ IInterface * pIObjectIn,
        /* [out] */ IInterface ** ppIObjectOut);

    CARAPI KMarshalTst11(
        /* [in] */ EMuid * pguidIn,
        /* [in] */ InterfaceID * pInterfaceIDIn,
        /* [in] */ ClassID * pClassIDIn,
        /* [out] */ EMuid * pguidOut,
        /* [out] */ InterfaceID * pInterfaceIDOut,
        /* [out] */ ClassID * pClassIDOut);

    CARAPI KMarshalTst12(
        /* [in] */ AString asIn,
        /* [in] */ WString wsIn,
        /* [out] */ AStringBuf * pAsbOut,
        /* [out] */ WStringBuf * pWsbOut);

    CARAPI KMarshalTst13(
        /* [in] */ const BufferOf<Byte> & AInt8In,
        /* [in] */ const BufferOf<Byte> & AByteIn,
        /* [in] */ const BufferOf<Boolean> & ABoolIn,
        /* [out] */ BufferOf<Byte> * pAInt8Out,
        /* [out] */ BufferOf<Byte> * pAByteOut,
        /* [out] */ BufferOf<Boolean> * pABoolOut);

    CARAPI KMarshalTst14(
        /* [in] */ const BufferOf<Int16> & AInt16In,
        /* [in] */ const BufferOf<Int16> & AUInt16In,
        /* [out] */ BufferOf<Int16> * pAInt16Out,
        /* [out] */ BufferOf<Int16> * pAUInt16Out);

    CARAPI KMarshalTst15(
        /* [in] */ const BufferOf<Int32> & AInt32In,
        /* [in] */ const BufferOf<Int32> & AUInt32In,
        /* [out] */ BufferOf<Int32> * pAInt32Out,
        /* [out] */ BufferOf<Int32> * pAUInt32Out);

    CARAPI KMarshalTst16(
        /* [in] */ const BufferOf<Int64> & AInt64In,
        /* [in] */ const BufferOf<Int64> & AUInt64In,
        /* [out] */ BufferOf<Int64> * pAInt64Out,
        /* [out] */ BufferOf<Int64> * pAUInt64Out);

    CARAPI KMarshalTst17(
        /* [in] */ const BufferOf<Float> & AFloatIn,
        /* [in] */ const BufferOf<Double> & ADoubleIn,
        /* [out] */ BufferOf<Float> * pAFloatOut,
        /* [out] */ BufferOf<Double> * pADoubleOut);

    CARAPI KMarshalTst18(
        /* [in] */ const BufferOf<AChar> & AACharIn,
        /* [in] */ const BufferOf<WChar> & AWCharIn,
        /* [out] */ BufferOf<AChar> * pAACharOut,
        /* [out] */ BufferOf<WChar> * pAWCharOut);

    CARAPI KMarshalTst19(
        /* [in] */ const BufferOf<struct TEST_STRUCT1> & AStructIn,
        /* [out] */ BufferOf<struct TEST_STRUCT1> * pAStructOut);

    CARAPI KMarshalTst20(
        /* [in] */ const BufferOf<struct TEST_STRUCT2> & AStructIn,
        /* [out] */ BufferOf<struct TEST_STRUCT2> * pAStructOut);

    CARAPI KMarshalTst21(
        /* [in] */ const BufferOf<IInterface *> & AObjectIn);

    //CARAPI KMarshalTst22(
    //    /* [out] */ BufferOf<IInterface *> * pAObjectOut);

    CARAPI KMarshalTst23(
        /* [in] */ const BufferOf<EGuid> & AEGuidIn,
        /* [in] */ const BufferOf<EMuid> & AEMuidIn,
        /* [out] */ BufferOf<EGuid> * pAEGuidOut,
        /* [out] */ BufferOf<EMuid> * pAEMuidOut);

    CARAPI KMarshalTst24(
        /* [in] */ const BufferOf<ECode> & AECodeIn,
        /* [out] */ BufferOf<ECode> * pAECodeOut);

    CARAPI KMarshalTst25(
        /* [in] */ const BufferOf<Byte> & AInt8In,
        /* [in] */ const BufferOf<Int16> & AInt16In,
        /* [in] */ const BufferOf<Int32> & AInt32In,
        /* [in] */ AString AStrIn,
        /* [in] */ WString WStrIn,
        /* [out] */ BufferOf<Byte> * pAInt8Out,
        /* [out] */ BufferOf<Int16> * pAInt16Out,
        /* [out] */ BufferOf<Int32> * pAInt32Out,
        /* [out] */ AStringBuf * pAsbOut,
        /* [out] */ WStringBuf * pWsbOut);

    CARAPI KMarshalTst26(
        /* [in] */ const BufferOf<Int64> & AInt64In,
        /* [in] */ const BufferOf<Float> & AFloatIn,
        /* [in] */ const BufferOf<Double> & ADoubleIn,
        /* [in] */ const BufferOf<AChar> & AACharIn,
        /* [in] */ const BufferOf<WChar> & AWCharIn,
        /* [out] */ BufferOf<Int64> * pAInt64Out,
        /* [out] */ BufferOf<Float> * pAFloatOut,
        /* [out] */ BufferOf<Double> * pADoubleOut,
        /* [out] */ BufferOf<AChar> * pAACharOut,
        /* [out] */ BufferOf<WChar> * pAWCharOut);

    CARAPI KMarshalTst33(
        /* [in] */ const ArrayOf<Byte> & AInt8In,
        /* [in] */ const ArrayOf<Byte> & AByteIn,
        /* [in] */ const ArrayOf<Boolean> & ABoolIn,
        /* [out] */ ArrayOf<Byte> * pAInt8Out,
        /* [out] */ ArrayOf<Byte> * pAByteOut,
        /* [out] */ ArrayOf<Boolean> * pABoolOut);

    CARAPI KMarshalTst34(
        /* [in] */ const ArrayOf<Int16> & AInt16In,
        /* [in] */ const ArrayOf<Int16> & AUInt16In,
        /* [out] */ ArrayOf<Int16> * pAInt16Out,
        /* [out] */ ArrayOf<Int16> * pAUInt16Out);

    CARAPI KMarshalTst35(
        /* [in] */ const ArrayOf<Int32> & AInt32In,
        /* [in] */ const ArrayOf<Int32> & AUInt32In,
        /* [out] */ ArrayOf<Int32> * pAInt32Out,
        /* [out] */ ArrayOf<Int32> * pAUInt32Out);

    CARAPI KMarshalTst36(
        /* [in] */ const ArrayOf<Int64> & AInt64In,
        /* [in] */ const ArrayOf<Int64> & AUInt64In,
        /* [out] */ ArrayOf<Int64> * pAInt64Out,
        /* [out] */ ArrayOf<Int64> * pAUInt64Out);

    CARAPI KMarshalTst37(
        /* [in] */ const ArrayOf<Float> & AFloatIn,
        /* [in] */ const ArrayOf<Double> & ADoubleIn,
        /* [out] */ ArrayOf<Float> * pAFloatOut,
        /* [out] */ ArrayOf<Double> * pADoubleOut);

    CARAPI KMarshalTst38(
        /* [in] */ const ArrayOf<AChar> & AACharIn,
        /* [in] */ const ArrayOf<WChar> & AWCharIn,
        /* [out] */ ArrayOf<AChar> * pAACharOut,
        /* [out] */ ArrayOf<WChar> * pAWCharOut);

    CARAPI KMarshalTst39(
        /* [in] */ const ArrayOf<struct TEST_STRUCT1> & AStructIn,
        /* [out] */ ArrayOf<struct TEST_STRUCT1> * pAStructOut);

    CARAPI KMarshalTst40(
        /* [in] */ const ArrayOf<struct TEST_STRUCT2> & AStructIn,
        /* [out] */ ArrayOf<struct TEST_STRUCT2> * pAStructOut);

    CARAPI KMarshalTst41(
        /* [in] */ const ArrayOf<IInterface *> & AObjectIn);

    //CARAPI KMarshalTst42(
    //    /* [out] */ ArrayOf<IInterface *> * pAObjectOut);

    CARAPI KMarshalTst43(
        /* [in] */ const ArrayOf<EGuid> & AEGuidIn,
        /* [in] */ const ArrayOf<EMuid> & AEMuidIn,
        /* [out] */ ArrayOf<EGuid> * pAEGuidOut,
        /* [out] */ ArrayOf<EMuid> * pAEMuidOut);

    CARAPI KMarshalTst44(
        /* [in] */ const ArrayOf<ECode> & AECodeIn,
        /* [out] */ ArrayOf<ECode> * pAECodeOut);

    CARAPI KMarshalTst45(
        /* [in] */ const ArrayOf<Byte> & AInt8In,
        /* [in] */ const ArrayOf<Int16> & AInt16In,
        /* [in] */ const ArrayOf<Int32> & AInt32In,
        /* [in] */ AString AStrIn,
        /* [in] */ WString WStrIn,
        /* [out] */ ArrayOf<Byte> * pAInt8Out,
        /* [out] */ ArrayOf<Int16> * pAInt16Out,
        /* [out] */ ArrayOf<Int32> * pAInt32Out,
        /* [out] */ AStringBuf * pAsbOut,
        /* [out] */ WStringBuf * pWsbOut);

    CARAPI KMarshalTst46(
        /* [in] */ const ArrayOf<Int64> & AInt64In,
        /* [in] */ const ArrayOf<Float> & AFloatIn,
        /* [in] */ const ArrayOf<Double> & ADoubleIn,
        /* [in] */ const ArrayOf<AChar> & AACharIn,
        /* [in] */ const ArrayOf<WChar> & AWCharIn,
        /* [out] */ ArrayOf<Int64> * pAInt64Out,
        /* [out] */ ArrayOf<Float> * pAFloatOut,
        /* [out] */ ArrayOf<Double> * pADoubleOut,
        /* [out] */ BufferOf<AChar> * pAACharOut,
        /* [out] */ BufferOf<WChar> * pAWCharOut);

private:
    Int32 m_Ref;
};

#endif // __CKMARSHALTST_H__
